package ioperations;

import book.Book;
import book.BookList;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: wwy
 * Date: 2024-11-19
 * Time: 22:46
 */

public class ShowOperation implements IOperation {
    @Override
    public void work(BookList bookList) {
        System.out.println("显示图书....");
        int currentSize = bookList.getUsedSize();//3
        for (int i = 0; i < currentSize; i++) {
            Book book = bookList.getBook(i);
            System.out.println(book);
            //Book book1 = bookList[i];
        }
    }
}

